package baidumodel.constant;

/**
 * @Author wuchenxi
 * @Date 2023-07-23 17:42:18
 */
public class ApiConstant {

    /**
     * Stable-Diffusion-XL
     */
    public static final String STABLE_DIFFUSION_XL = "https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop/text2image/sd_xl?access_token=";

    /**
     * Llama-2-7b-chat
     */
    public static final String LLAMA_2_7B_CHAT = "https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/llama_2_7b?access_token=";

    /**
     * Llama-2-13b-chat
     */
    public static final String LLAMA_2_13B_CHAT = "https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/llama_2_13b?access_token=";

    /**
     * Llama-2-70b-chat
     */
    public static final String LLAMA_2_70B_CHAT = "https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/llama_2_70b?access_token=";

    /**
     * 需要单独申请发布的模型api地址
     */
    public static final String WITH_API_NAME = "https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/%s?access_token=";

    /**
     * Embedding-V1
     */
    public static final String EMBEDDING_V1 = "https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop/embeddings/embedding-v1?access_token=";

    /**
     * VisualGLM-6B
     */
    public static final String VISUALGLM_6B = "https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop/txt2img/%s?access_token=";

    /**
     * prompt模板接口
     */
    public static final String PROMPT_TEMPLATE = "https://aip.baidubce.com/rest/2.0/wenxinworkshop/api/v1/template/info?access_token=";

    /**
     * ERNIE-Bot 发起会话接口
     */
    public static final String ERNIE_BOT = "https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/completions?access_token=";

    /**
     * ERNIE_BOT_TURBO 发起会话接口
     */
    public static final String ERNIE_BOT_TURBO = "https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/eb-instant?access_token=";

    /**
     * ERNIE-Bot-4
     */
    public static final String ERNIE_BOT_4 = "https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/completions_pro?access_token=";

    /**
     * BLOOMZ_7B 发起会话接口
     */
    public static final String BLOOMZ_7B = "https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/bloomz_7b1?access_token=";

    public static String getToken(String appKey, String secretKey) {
        return "https://aip.baidubce.com/oauth/2.0/token?grant_type=client_credentials&client_id=" + appKey + "&client_secret=" + secretKey;
    }


}
